import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    meta:{
      showHeader:false,
      title:'首页'
    },
    component: Home
  },
  {
    path: '/Button',
    name: 'Button',
    meta:{
      showHeader:true,
      title:'Button'
    },
    component: () => import(/* webpackChunkName: "about" */ '../views/Button.vue'),
  },
  {
    path:'/Icon',
    name:'Icon',
    meta:{
      showHeader:true,
      title:'Icon'
    },
    component:()=>import('../views/Icon.vue')
  },
  {
    path:'/loading',
    name:'Loading',
    meta:{
      showHeader:true,
      title:'Loading'
    },
    component:()=>import('../views/Loading.vue')
  },
  {
    path:'/header',
    name:'Header',
    meta:{
      showHeader:true,
      title:'Header'
    },
    component:()=>import('../views/Header.vue')
  }
]


const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})


export default router
